package com.example.bookmall.entity.order;


import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Data
@TableName("orders")
@Accessors(chain = true)
//订单
public class Orders {
    @TableId(type = IdType.INPUT)
    private String orderId;

    private Integer userId;

    //TODO：订单地址修改类型
    private Integer addressId;

    private BigDecimal totalAmount;

    //订单状态
    //待支付=1  取消订单  待发货（支付完成） 待收货（发货）  已完成（到货）
    private Integer orderStatus;
    private Integer payMethod;


    private LocalDateTime payTime;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime updateTime;


    @TableField(exist = false)
    private List<OrderItemVo> orderitems ;//订单明细

}